/**
 * @filename:Const 2017年8月01日
 * @project 微面    边鹏  V1.0
 * Copyright(c) 2017 BianP Co. Ltd. 
 * All right reserved. 
 */
package com.lazy.develop.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lazy.develop.generator.dao.UserMapper;
import com.lazy.develop.generator.entity.User;
import com.lazy.develop.model.Record;
import com.lazy.develop.service.UserService;

/**
 * 	@描述  逻辑层，实现类(用户)
 *  @author BianP
 */
@Service
public class UserServiceImpl implements UserService {
	Logger logger = Logger.getLogger(UserServiceImpl.class);
	
	@Autowired
	public UserMapper userDao;
	
	//查询对象
	@Override
	public User selectByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return userDao.selectByPrimaryKey(id);
	}

	//添加
	@Override
	public int insertSelective(User user) {
		// TODO Auto-generated method stub
		return userDao.insertSelective(user);
	}

	//选择性 -- 更新
	@Override
	public int updateByPrimaryKeySelective(User user) {
		// TODO Auto-generated method stub
		return userDao.updateByPrimaryKeySelective(user);
	}

	//全修改 -- 更新
	@Override
	public int updateByPrimaryKey(User user) {
		// TODO Auto-generated method stub
		return userDao.updateByPrimaryKey(user);
	}

	//根据ID 删除对象
	@Override
	public int deleteByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return userDao.deleteByPrimaryKey(id);
	}

	@Override
	public List<Record> getUserRolePage(Record record) {
		// TODO Auto-generated method stub
		return userDao.getUserRolePage(record);
	}

	@Override
	public List<User> getUserAll() {
		// TODO Auto-generated method stub
		return userDao.getUserAll();
	}
}
